<template>
	<div>
		<div id="mydiv1">
			<div id="mydiv1_1">
				<image :src="avatarurl" style="width: 50px;height: 50px;border-radius:50%"></image>
			</div>
			<div id="mydiv1_2">
				{{ nickname }}
			</div>
		</div>
<!-- 		<div id="mydiv2">
			<div
				style="background-color: #4142F4;width: 50px;height: 50px;border-radius: 50%;margin-left: 10px;position: relative;" @click="gomoney">

				<image class="my_images" src="../../static/images/my_jf.png"></image>
			</div>
			<div class="mydiv2_1" style="background-color: #5CDCC5;" @click="gorepair">
				<image class="my_images" src="../../static/images/my_ll.png"></image>
			</div>
			<div class="mydiv2_1" style="background-color: #F7AB50;">
				<image class="my_images" src="../../static/images/qchc3.png" @click="cancellj"></image>
			</div>
			<div style="background-color: #F35B7E;width: 50px;height: 50px;border-radius: 50%;margin-right: 10px;position: relative;"
				@click="gocar">
				<image class="my_images" src="../../static/images/my_car.png"></image>
			</div>
		</div>
		<div id="mydiv3">
			<div class="font_my" style="margin-left: 10px;" @click="gomoney">
				缴费中心
			</div>
			<div class="font_my" style="margin-right: 15px;" @click="gorepair">
				报修中心
			</div>
			<div class="font_my" style="margin-right: 15px;" @click="cancellj">
				清理缓存
			</div>
			<div class="font_my" style="margin-right: 10px;" @click="gocar">
				车辆中心
			</div>
		</div> -->
		<div style="margin-top: 30px;" class="my_cell">
			<van-cell is-link link-type="navigateTo" url="/pages/my/my_answer/myAnswer">
				<view slot="title">
					<van-row gutter="20">
						<van-col span="4">
							<image src="../../static/images/my_add.png" style="width: 30px;height: 30px;"></image>
						</van-col>
						<van-col span="8">
							<view class="van-cell-text" style="font-size: 15px;font-family: '苹方';margin-top: 5px;">我的回答
							</view>
						</van-col>
					</van-row>
				</view>
			</van-cell>
		</div>
		<div class="my_cell">
			<van-cell is-link link-type="navigateTo" url="/pages/my/my_answer/atMy">
				<view slot="title">
					<van-row gutter="20">
						<van-col span="4">
							<image src="../../static/images/my_edit.png" style="width: 30px;height: 30px;"></image>
						</van-col>
						<van-col span="8">
							<view class="van-cell-text" style="font-size: 15px;font-family: '苹方';margin-top: 5px;">提到我的
							</view>
						</van-col>
					</van-row>
				</view>
			</van-cell>
		</div>
		<div class="my_cell">
			<van-cell is-link link-type="navigateTo" url="/pages/my/my_question/my_question">
				<view slot="title">
					<van-row gutter="20">
						<van-col span="4">
							<image src="https://czsc.oss-cn-beijing.aliyuncs.com/mini/my_question.png" style="width: 30px;height: 30px;"></image>
						</van-col>
						<van-col span="8">
							<view class="van-cell-text" style="font-size: 15px;font-family: '苹方';margin-top: 5px;">我的提问
							</view>
						</van-col>
					</van-row>
				</view>
			</van-cell>
		</div>
		<div class="my_cell" @click="clearAllCache()">
			<van-cell is-link link-type="navigateTo">
				<view slot="title">
					<van-row gutter="20">
						<van-col span="4">
							<image src="../../static/images/my_xx.png" style="width: 30px;height: 30px;"></image>
						</van-col>
						<van-col span="8">
							<view class="van-cell-text" style="font-size: 15px;font-family: '苹方';margin-top: 5px;">缓存清理
							</view>
						</van-col>
					</van-row>
				</view>
			</van-cell>
		</div>
		
		<!-- <div class="my_cell">
			<van-cell is-link link-type="navigateTo" url="/pages/money/historyMoney">
				<view slot="title">
					<van-row gutter="20">
						<van-col span="4">
							<image src="../../static/images/my_pay.png" style="width: 30px;height: 30px;"></image>
						</van-col>
						<van-col span="8">
							<view class="van-cell-text" style="font-size: 15px;font-family: '苹方';margin-top: 5px;">缴费记录
							</view>
						</van-col>
					</van-row>
				</view>
			</van-cell>
		</div> -->
	</div>
</template>

<script>
	var that;
	export default {
		data() {
			return {
				active: 0,
				active2: 0,
				nickname: '',
				avatarurl: ''
			}
		},
		created() {
			that = this;
			that.nickname = uni.getStorageSync('nickname');
			that.avatarurl = uni.getStorageSync('avatarurl');
		},
		onLoad() {
			
		},
		methods: {
			show1() {
				uni.showToast({
					title: '功能正在开发中.....',
					duration: 2000
				});
			},
			gocar() {
				uni.switchTab({
					url: '/pages/cars/cars'
				});
			},
			gorepair(){
				uni.switchTab({
					url: '/pages/repair/repair'
				});
			},
			gomoney(){
				uni.switchTab({
					url: '/pages/money/money'
				});
			},
			clearAllCache(){
				uni.showModal({
				    title: '提示',
				    content: '是否清除所有缓存信息',
				    success: function (res) {
				        if (res.confirm) {
				            uni.clearStorageSync();
							uni.showToast({
							    title: '清除成功',
							    duration: 1000
							});
				        } else if (res.cancel) {}
				    }
				});
			}
		}
	}
</script>
<style>
	#mydiv1 {
		height: 110px;
		width: 100%;
		background-color: #4142F4;
		display: flex;
	}

	#mydiv1_1 {
		padding-right: 10px;
		padding-top: 35px;
		margin-left: 15px;
	}

	#mydiv1_2 {
		margin-top: 45px;
		color: #FFFFFF;
		font-family: '苹方';
		font-size: 13px;
	}

	#mydiv2 {
		display: flex;
		justify-content: space-between;
		margin-top: 20px;
	}

	#mydiv3 {
		display: flex;
		justify-content: space-between;
		margin-top: 10px;
	}

	.mydiv2_1 {
		width: 50px;
		height: 50px;
		border-radius: 50%;
		margin-right: 10px;
		position: relative;
	}

	.my_images {
		width: 25px;
		height: 25px;
		position: absolute;
		top: 50%;
		margin-top: -12.5px;
		left: 50%;
		margin-left: -12.5px;
	}

	.my_cell {
		margin-top: 15px;

	}

	.font_my {
		font-size: 12px;
	}
</style>
